3.138 \(\int (g+h x)^{-3-2 p} (a+c x^2)^p (d+e x+f x^2) \, dx\)

Optimal. Leaf size=474 \[ -\frac{f \left (a+c x^2\right )^p (g+h x)^{-2 p} \left (1-\frac{g+h x}{g-\frac{\sqrt{-a} h}{\sqrt{c}}}\right )^{-p} \left (1-\frac{g+h x}{\frac{\sqrt{-a} h}{\sqrt{c}}+g}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;\frac{g+h x}{g-\frac{\sqrt{-a} h}{\sqrt{c}}},\frac{g+h x}{g+\frac{\sqrt{-a} h}{\sqrt{c}}}\right )}{2 h^3 p}+\frac{\left (\sqrt{-a}-\sqrt{c} x\right ) \left (a+c x^2\right )^p (g+h x)^{-2 p-1} \left (-\frac{\left (\sqrt{-a}+\sqrt{c} x\right ) \left (\sqrt{-a} h+\sqrt{c} g\right )}{\left (\sqrt{-a}-\sqrt{c} x\right ) \left (\sqrt{c} g-\sqrt{-a} h\right )}\right )^{-p} \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \, _2F_1\left (-2 p-1,-p;-2 p;\frac{2 \sqrt{-a} \sqrt{c} (g+h x)}{\left (\sqrt{c} g-\sqrt{-a} h\right ) \left (\sqrt{-a}-\sqrt{c} x\right )}\right )}{h^2 (2 p+1) \left (\sqrt{-a} h+\sqrt{c} g\right ) \left (a h^2+c g^2\right )}-\frac{\left (a+c x^2\right )^{p+1} (g+h x)^{-2 (p+1)} \left (d h^2-e g h+f g^2\right )}{2 h (p+1) \left (a h^2+c g^2\right )} \]

[Out]

-((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(1 + p))/(2*h*(c*g^2 + a*h^2)*(1 + p)*(g + h*x)^(2*(1 + p))) - (f*(a + c
*x^2)^p*AppellF1[-2*p, -p, -p, 1 - 2*p, (g + h*x)/(g - (Sqrt[-a]*h)/Sqrt[c]), (g + h*x)/(g + (Sqrt[-a]*h)/Sqrt
[c])])/(2*h^3*p*(g + h*x)^(2*p)*(1 - (g + h*x)/(g - (Sqrt[-a]*h)/Sqrt[c]))^p*(1 - (g + h*x)/(g + (Sqrt[-a]*h)/
Sqrt[c]))^p) + ((a*h^2*(2*f*g - e*h) + c*(f*g^3 - d*g*h^2))*(Sqrt[-a] - Sqrt[c]*x)*(g + h*x)^(-1 - 2*p)*(a + c
*x^2)^p*Hypergeometric2F1[-1 - 2*p, -p, -2*p, (2*Sqrt[-a]*Sqrt[c]*(g + h*x))/((Sqrt[c]*g - Sqrt[-a]*h)*(Sqrt[-
a] - Sqrt[c]*x))])/(h^2*(Sqrt[c]*g + Sqrt[-a]*h)*(c*g^2 + a*h^2)*(1 + 2*p)*(-(((Sqrt[c]*g + Sqrt[-a]*h)*(Sqrt[
-a] + Sqrt[c]*x))/((Sqrt[c]*g - Sqrt[-a]*h)*(Sqrt[-a] - Sqrt[c]*x))))^p)

________________________________________________________________________________________

Rubi [A]  time = 0.519098, antiderivative size = 474, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {1656, 760, 133, 807, 727} \[ -\frac{f \left (a+c x^2\right )^p (g+h x)^{-2 p} \left (1-\frac{g+h x}{g-\frac{\sqrt{-a} h}{\sqrt{c}}}\right )^{-p} \left (1-\frac{g+h x}{\frac{\sqrt{-a} h}{\sqrt{c}}+g}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;\frac{g+h x}{g-\frac{\sqrt{-a} h}{\sqrt{c}}},\frac{g+h x}{g+\frac{\sqrt{-a} h}{\sqrt{c}}}\right )}{2 h^3 p}+\frac{\left (\sqrt{-a}-\sqrt{c} x\right ) \left (a+c x^2\right )^p (g+h x)^{-2 p-1} \left (-\frac{\left (\sqrt{-a}+\sqrt{c} x\right ) \left (\sqrt{-a} h+\sqrt{c} g\right )}{\left (\sqrt{-a}-\sqrt{c} x\right ) \left (\sqrt{c} g-\sqrt{-a} h\right )}\right )^{-p} \left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \, _2F_1\left (-2 p-1,-p;-2 p;\frac{2 \sqrt{-a} \sqrt{c} (g+h x)}{\left (\sqrt{c} g-\sqrt{-a} h\right ) \left (\sqrt{-a}-\sqrt{c} x\right )}\right )}{h^2 (2 p+1) \left (\sqrt{-a} h+\sqrt{c} g\right ) \left (a h^2+c g^2\right )}-\frac{\left (a+c x^2\right )^{p+1} (g+h x)^{-2 (p+1)} \left (d h^2-e g h+f g^2\right )}{2 h (p+1) \left (a h^2+c g^2\right )} \]

Antiderivative was successfully verified.

[In]

Int[(g + h*x)^(-3 - 2*p)*(a + c*x^2)^p*(d + e*x + f*x^2),x]

[Out]

-((f*g^2 - e*g*h + d*h^2)*(a + c*x^2)^(1 + p))/(2*h*(c*g^2 + a*h^2)*(1 + p)*(g + h*x)^(2*(1 + p))) - (f*(a + c
*x^2)^p*AppellF1[-2*p, -p, -p, 1 - 2*p, (g + h*x)/(g - (Sqrt[-a]*h)/Sqrt[c]), (g + h*x)/(g + (Sqrt[-a]*h)/Sqrt
[c])])/(2*h^3*p*(g + h*x)^(2*p)*(1 - (g + h*x)/(g - (Sqrt[-a]*h)/Sqrt[c]))^p*(1 - (g + h*x)/(g + (Sqrt[-a]*h)/
Sqrt[c]))^p) + ((a*h^2*(2*f*g - e*h) + c*(f*g^3 - d*g*h^2))*(Sqrt[-a] - Sqrt[c]*x)*(g + h*x)^(-1 - 2*p)*(a + c
*x^2)^p*Hypergeometric2F1[-1 - 2*p, -p, -2*p, (2*Sqrt[-a]*Sqrt[c]*(g + h*x))/((Sqrt[c]*g - Sqrt[-a]*h)*(Sqrt[-
a] - Sqrt[c]*x))])/(h^2*(Sqrt[c]*g + Sqrt[-a]*h)*(c*g^2 + a*h^2)*(1 + 2*p)*(-(((Sqrt[c]*g + Sqrt[-a]*h)*(Sqrt[
-a] + Sqrt[c]*x))/((Sqrt[c]*g - Sqrt[-a]*h)*(Sqrt[-a] - Sqrt[c]*x))))^p)

Rule 1656

Int[(Pq_)*((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> With[{q = Expon[Pq, x]}, Dist[Co
eff[Pq, x, q]/e^q, Int[(d + e*x)^(m + q)*(a + c*x^2)^p, x], x] + Dist[1/e^q, Int[(d + e*x)^m*(a + c*x^2)^p*Exp
andToSum[e^q*Pq - Coeff[Pq, x, q]*(d + e*x)^q, x], x], x]] /; FreeQ[{a, c, d, e, m, p}, x] && PolyQ[Pq, x] &&
NeQ[c*d^2 + a*e^2, 0] &&  !(IGtQ[m, 0] && RationalQ[a, c, d, e] && (IntegerQ[p] || ILtQ[p + 1/2, 0]))

Rule 760

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Rt[-(a*c), 2]}, Dist[(a + c*x^
2)^p/(e*(1 - (d + e*x)/(d + (e*q)/c))^p*(1 - (d + e*x)/(d - (e*q)/c))^p), Subst[Int[x^m*Simp[1 - x/(d + (e*q)/
c), x]^p*Simp[1 - x/(d - (e*q)/c), x]^p, x], x, d + e*x], x]] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a
*e^2, 0] &&  !IntegerQ[p]

Rule 133

Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_Symbol] :> Simp[(c^n*e^p*(b*x)^(m +
 1)*AppellF1[m + 1, -n, -p, m + 2, -((d*x)/c), -((f*x)/e)])/(b*(m + 1)), x] /; FreeQ[{b, c, d, e, f, m, n, p},
 x] &&  !IntegerQ[m] &&  !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])

Rule 807

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> -Simp[((e*f - d*g
)*(d + e*x)^(m + 1)*(a + c*x^2)^(p + 1))/(2*(p + 1)*(c*d^2 + a*e^2)), x] + Dist[(c*d*f + a*e*g)/(c*d^2 + a*e^2
), Int[(d + e*x)^(m + 1)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0]
&& EqQ[Simplify[m + 2*p + 3], 0]

Rule 727

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((Rt[-(a*c), 2] - c*x)*(d + e*x)^(m
 + 1)*(a + c*x^2)^p*Hypergeometric2F1[m + 1, -p, m + 2, (2*c*Rt[-(a*c), 2]*(d + e*x))/((c*d - e*Rt[-(a*c), 2])
*(Rt[-(a*c), 2] - c*x))])/((m + 1)*(c*d + e*Rt[-(a*c), 2])*(((c*d + e*Rt[-(a*c), 2])*(Rt[-(a*c), 2] + c*x))/((
c*d - e*Rt[-(a*c), 2])*(-Rt[-(a*c), 2] + c*x)))^p), x] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a*e^2, 0
] &&  !IntegerQ[p] && EqQ[m + 2*p + 2, 0]

Rubi steps

\begin{align*} \int (g+h x)^{-3-2 p} \left (a+c x^2\right )^p \left (d+e x+f x^2\right ) \, dx &=\frac{\int (g+h x)^{-3-2 p} \left (-f g^2+d h^2-h (2 f g-e h) x\right ) \left (a+c x^2\right )^p \, dx}{h^2}+\frac{f \int (g+h x)^{-1-2 p} \left (a+c x^2\right )^p \, dx}{h^2}\\ &=-\frac{\left (f g^2-e g h+d h^2\right ) (g+h x)^{-2 (1+p)} \left (a+c x^2\right )^{1+p}}{2 h \left (c g^2+a h^2\right ) (1+p)}-\frac{\left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \int (g+h x)^{-2-2 p} \left (a+c x^2\right )^p \, dx}{h^2 \left (c g^2+a h^2\right )}+\frac{\left (f \left (a+c x^2\right )^p \left (1-\frac{g+h x}{g-\frac{\sqrt{-a} h}{\sqrt{c}}}\right )^{-p} \left (1-\frac{g+h x}{g+\frac{\sqrt{-a} h}{\sqrt{c}}}\right )^{-p}\right ) \operatorname{Subst}\left (\int x^{-1-2 p} \left (1-\frac{x}{g-\frac{\sqrt{-a} h}{\sqrt{c}}}\right )^p \left (1-\frac{x}{g+\frac{\sqrt{-a} h}{\sqrt{c}}}\right )^p \, dx,x,g+h x\right )}{h^3}\\ &=-\frac{\left (f g^2-e g h+d h^2\right ) (g+h x)^{-2 (1+p)} \left (a+c x^2\right )^{1+p}}{2 h \left (c g^2+a h^2\right ) (1+p)}-\frac{f (g+h x)^{-2 p} \left (a+c x^2\right )^p \left (1-\frac{g+h x}{g-\frac{\sqrt{-a} h}{\sqrt{c}}}\right )^{-p} \left (1-\frac{g+h x}{g+\frac{\sqrt{-a} h}{\sqrt{c}}}\right )^{-p} F_1\left (-2 p;-p,-p;1-2 p;\frac{g+h x}{g-\frac{\sqrt{-a} h}{\sqrt{c}}},\frac{g+h x}{g+\frac{\sqrt{-a} h}{\sqrt{c}}}\right )}{2 h^3 p}+\frac{\left (a h^2 (2 f g-e h)+c \left (f g^3-d g h^2\right )\right ) \left (\sqrt{-a}-\sqrt{c} x\right ) \left (-\frac{\left (\sqrt{c} g+\sqrt{-a} h\right ) \left (\sqrt{-a}+\sqrt{c} x\right )}{\left (\sqrt{c} g-\sqrt{-a} h\right ) \left (\sqrt{-a}-\sqrt{c} x\right )}\right )^{-p} (g+h x)^{-1-2 p} \left (a+c x^2\right )^p \, _2F_1\left (-1-2 p,-p;-2 p;\frac{2 \sqrt{-a} \sqrt{c} (g+h x)}{\left (\sqrt{c} g-\sqrt{-a} h\right ) \left (\sqrt{-a}-\sqrt{c} x\right )}\right )}{h^2 \left (\sqrt{c} g+\sqrt{-a} h\right ) \left (c g^2+a h^2\right ) (1+2 p)}\\ \end{align*}

Mathematica [F]  time = 2.91037, size = 0, normalized size = 0. \[ \int (g+h x)^{-3-2 p} \left (a+c x^2\right )^p \left (d+e x+f x^2\right ) \, dx \]

Verification is Not applicable to the result.

[In]

Integrate[(g + h*x)^(-3 - 2*p)*(a + c*x^2)^p*(d + e*x + f*x^2),x]

[Out]

Integrate[(g + h*x)^(-3 - 2*p)*(a + c*x^2)^p*(d + e*x + f*x^2), x]

________________________________________________________________________________________

Maple [F]  time = 0.754, size = 0, normalized size = 0. \begin{align*} \int \left ( hx+g \right ) ^{-3-2\,p} \left ( c{x}^{2}+a \right ) ^{p} \left ( f{x}^{2}+ex+d \right ) \, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x)

[Out]

int((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (f x^{2} + e x + d\right )}{\left (c x^{2} + a\right )}^{p}{\left (h x + g\right )}^{-2 \, p - 3}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x, algorithm="maxima")

[Out]

integrate((f*x^2 + e*x + d)*(c*x^2 + a)^p*(h*x + g)^(-2*p - 3), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left ({\left (f x^{2} + e x + d\right )}{\left (c x^{2} + a\right )}^{p}{\left (h x + g\right )}^{-2 \, p - 3}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x, algorithm="fricas")

[Out]

integral((f*x^2 + e*x + d)*(c*x^2 + a)^p*(h*x + g)^(-2*p - 3), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)**(-3-2*p)*(c*x**2+a)**p*(f*x**2+e*x+d),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (f x^{2} + e x + d\right )}{\left (c x^{2} + a\right )}^{p}{\left (h x + g\right )}^{-2 \, p - 3}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((h*x+g)^(-3-2*p)*(c*x^2+a)^p*(f*x^2+e*x+d),x, algorithm="giac")

[Out]

integrate((f*x^2 + e*x + d)*(c*x^2 + a)^p*(h*x + g)^(-2*p - 3), x)